package com.lingshu.core.eventbus;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

/**
 * @author 于定金
 * @version 1.0
 * @Date 2024/4/12 9:34
 * @Description
 */
public abstract class BaseStickySubscriber<T> extends BaseSubscriber<T> {
    public BaseStickySubscriber(EventKey key) {
        super(key);
    }
    @Subscribe(threadMode = ThreadMode.POSTING,sticky = true)
    @Override
    public void onSubscribeEvent(EventData<T> eventData) {
        //Log.e("testBus","黏性事件 key-> "+key+"   eventData key->"+eventData.getKey() +"    是否相等->"+(key==eventData.getKey()));
        super.onSubscribeEvent(eventData);
    }
}
